package com.gljx.util;

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Properties;

/**
 * 获取配置文件数据
* @author LiXiang
* @date 2017年10月23日 下午5:10:57 
*
 */
public class ResourceUtil {
	
	private static Properties props = new Properties();
	
	static {
		try (InputStreamReader in = new InputStreamReader(ResourceUtil.class.getClassLoader().getResourceAsStream("resource.properties"), "UTF-8")){
			props.load(in);  
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static String getProper(String key) {
		return props.getProperty(key);
	}
}
